<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>抽奖活动</title>
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/dpl.css" rel="stylesheet">
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/bui.css" rel="stylesheet">
<script src="/assets/js/jquery-1.8.1.min.js"></script>
<script src="http://g.alicdn.com/bui/seajs/2.3.0/sea.js"></script>
<script src="http://g.alicdn.com/bui/bui/1.1.21/config.js"></script>
<script src="/assets/shopmanage/global_menu_jquery.js"></script>
<script src="/assets/shopmanage/index.js"></script>
	<style>
	h1 button,h2 button,h3 button,h4 button,.title button,.gift_hqfs button,.title a{ldelim}position:absolute{rdelim}
	a.js-edit {ldelim}margin-left:5px{rdelim}
	.mobile {ldelim}  display: inline-block;
		  padding-left: 25px;
		  vertical-align: text-top;
		  background: url(//img.alicdn.com/tps/i2/T1tfzjFLdbXXXXERPb-25-80.png) 5px no-repeat;
	{rdelim}
	.pc {ldelim}  display: inline-block;
		  padding-left: 30px;
		  vertical-align: text-top;
		  background: url(//img.alicdn.com/tps/i2/T1tfzjFLdbXXXXERPb-25-80.png) 5px 5px no-repeat;
	{rdelim}
	</style>
</head>
<body style="width:990px;margin:0 auto;padding:10px 0;">
<input type="hidden" class="qrcode" value="{$qrcode|default:''}" />
<input type="hidden" class="moburl" value="{$moburl}" />
<input type="hidden" class="setting" value="{$tool_info.templet_code|default:""}" />
<input type="hidden" class="setting_pic" value="{$tool_info.pic_url|default:""}" />
 <div class="doc-content">
    <div class="panel">
      <div class="panel-body">
	  
	  <div class="row">
		<div class="span24 doc-content">
		<h3 class="pull-left">我的互动 >> 抽奖活动 >> 抽奖活动列表</h3>
		<!-- <a class="button pull-right" style="margin-left:10px" href="/?m=Kxdr&c=Index&a=show_tools"><i class="icon-home"></i>{$L.SYS_RETURN}</a> -->
			
		<div class="button-group pull-right">
		  {include file='../../../PublicView/global_menu.html'}
		</div>
		</div>
	  </div>
	  <hr />
	  <div class="row">
  <div class="span24 doc-content">
	<div class="row" style="margin-bottom:20px">
	<div class="span8 centered"><img src="http://img04.taobaocdn.com/imgextra/i4/27390555/TB2yYQOXVXXXXX6XpXXXXXXXXXX-27390555.png_300x300.jpg" /></div>
	<!-- <div class="span13 tips tips-small tips-notice" >
		<h2>公告</h2>
		<h4>　　我的互动</h4>
		日常奖品与高级活动的活动参数、外观、奖品都是分开的。日常活动在没有高级活动时进行。日常活动不支持高级概率，需要高级概率等请创建高级活动。
	    <div class="button-group " style="margin-bottom:20px">
		  <a href="/?a=gamecfg_1&m=Shopmanage&daily=1" class="button"><i class="icon-pencil"></i>抽奖条件</a>
		  <a class="button" href="/?c=gifts&m=Shopmanage"><i class="icon-gift"></i>日常奖品</a>
		  <a class="button pc" href="/?a=bandcfg&m=Shopmanage&c=frontcfg">PC外观</a>
		  <a class="button" href="/?m=Shopmanage&c=wins"><i class="icon-user"></i>中奖人</a>
	    </div>
		</div> -->
	<div class="span12 offset1">
	<a class="button button-danger" href="/?m=Shopmanage&c=event&a=step2&create=1" style="width: 380px;height: 50px;padding-top: 30px;margin-bottom:5px"><h2>创建高级活动</h2></a>
	<div class="tips tips-small tips-info" style="width:400px">
		<span class="x-icon x-icon-small x-icon-info"><i class="icon icon-white icon-info"></i></span>
		<div class="tips-content" style="_float:left">{$info.msg}</div>
	</div>
	</div>
	<div class="span2">
		<a class="button" href="/?m=Shopmanage&c=edit&a=show_pc_install" style="margin-top:10px">查看安装方法</a>
		<button class="button button-old-ver" style="margin-top:10px"><i class="icon-th-list"></i>管理老版本</button>
	</div>
	</div>
	  <ul class="toolbar">
        <li><a href="/?m=Shopmanage&c=Event&a=index" class="button button-mini button-primary"><i class="icon-white icon-stop"></i>全部</a></li>
        <li><a href="/?m=Shopmanage&c=Event&a=index&t=1" class="button button-mini button-info"><i class="icon-white icon-play"></i>进行中</a></li>
        <li><a href="/?m=Shopmanage&c=Event&a=index&t=2" class="button button-mini button-success"><i class="icon-white icon-step-forward"></i>未开始</a></li>
        <li><a href="/?m=Shopmanage&c=Event&a=index&t=3" class="button button-mini"><i class="icon-pause"></i>已结束</a></li>
        <li><a href="/?m=shopmanage&c=index&a=gamegg" class="button button-small button-warning"><i class="icon-qrcode icon-white"></i>设置公告</a></li>
		<li><button class="button button-small button-warning  js-copyurl"><i class="icon-qrcode icon-white"></i>复制移动端安装地址</button></li>
		<li class="pull-right"><form method="post" action="/?m=Shopmanage&c=Event&a=index&t={$t}"><input name="q" type="text" class=" input calendar" value="{$q|default:""}" data-tip="{ldelim}ext : '{$L.APP_SEARTCH}'{rdelim}" /> <button class="button"><i class="icon-search"></i>搜索</button></form></li>
      </ul> 
	    <ul class="breadcrumb">
			<li class="active">亲请注意：手机端外观正在逐步上线。PC端在没有高级活动时，展示老版本。<!-- 亲请注意：手机端、PC端同步已正式上线，如遇问题请及时反馈，谢谢。 --></li>
		</ul>
		{foreach from=$events item=item key=key}
			<div class="panel js-evd-{$item.id} {if $item.status=='running'}panel-primary{else}{if $item.status=='ready'}panel-success{/if}{/if}">
			  <div class="panel-header clearfix js-event js-ev-{$item.id}" style="cursor:pointer" data-eid="{$item.id}" data-giftids='{$item.gift_ids|default:""}'>
			    
				<h3 class="pull-left">
				<i class="icon-chevron-up {if $item.status=='running'}icon-white{/if} js-icon-{$item.id}"></i>
				[<span class="game_name{$item.game_id}">
				{if $item.status=='running'}正在进行{else}{if $item.status=='ready'}准备开始{else}已经结束{/if}{/if}]：
				{if $item.status=='running'}在{$item.start_time_str}开始的抽奖活动{else}{if $item.status=='ready'}准备在{$item.start_time_str}开始抽奖{/if}{/if}{if $item.status=='stopped'}已经{else}，将{/if}于{$item.end_time_str}结束活动：
				</span>
				{if $item.status=='stopped'}<i class="icon-pause"></i> {else}{if $item.status=='running'}<i class="icon-play icon-white"></i>{else}<i class="icon-step-forward"></i> {/if}{/if} 
				</h3>
				<span class="auxiliary-text offset1" {if $item.status=='running'}style="color:#FFF"{/if}>({$item.gift_quant}个奖品，{$item.gift_type}种中奖方式)</span>
				<!-- <a href="/?m=Kxdr&c=Index&a=step1&edit={$key}" class="button button-mini  pull-right js-edit-ev-{$item.id}" ><i class=" icon-pencil"></i></a> -->
				<!-- <button class="button button-mini  pull-right"><i class="icon-arrow-down"></i></button> -->
			  </div>
			  <div class="panel-body js-content-{$key} hide" style="line-height:24px">
			  <div>开始：{$item.start_time|date_format:"%Y-%m-%d %H:%M:%S"}，结束：{$item.end_time|date_format:"%Y-%m-%d %H:%M:%S"}
			  <a class="button button-mini" href="/?m=Shopmanage&c=event&a=step1&create=1&start_time={$item.end_time|date_format:"%Y-%m-%d %H:%M:%S"}&eid={$key}&tool={$item.curtool|default:''}" ><i class=" icon-pencil"></i>创建连续活动</a>
			  <a href="/?m=Shopmanage&c=edit&a=setting&eid={$key}" class="button button-mini">修改</a>
			  <a data-eid="{$key}" class="button button-mini button-danger button-remove">删除</a>
			  </div>
			  <div class="span12 title"><h1 class="pull-left event_title{$key}">奖品列表</h1> <button class="button button-mini js-edit hide" data-value="{$item.title}" data-field="event_title" data-eid="{$key}"><i class=" icon-pencil"></i></button></div>
			  	<div class="button-group pull-right" style="margin:0">
				  <a href="/?m=Shopmanage&c=edit&a=front_cfg&eid={$key}&skin=mob&mob={$item.mobtool|default:''}" class="button mobile">手机外观</a>
				  <a href="/?m=Shopmanage&c=edit&a=front_cfg&eid={$key}&skin=pc&cur={$item.curtool|default:''}" class="button pc">PC外观</a>
				  <a href="/?m=Shopmanage&c=Edit&a=gifts&eid={$key}" class="button">奖品</a>
				  <a href="/?m=Shopmanage&c=wins&a=users&eid={$key}" class="button">谁在抽奖</a>
				  <a href="/?m=Shopmanage&c=wins&eid={$key}" class="button">谁中奖了</a>
				</div>
			  {if !$item.gift_names}
			  <div class="span21"><a href="/?m=Shopmanage&c=Edit&a=gifts&eid={$key}" class="button button-small button-danger">添加奖品</a></div>
			  {else}
			  <div class="span21"><a href="/?m=Shopmanage&c=Edit&a=gifts&eid={$key}" class="button button-small button-warning">修改奖品</a></div>
			  {/if}
			  {foreach from=$item.gift_names item=gname key=g_key}
			  <div class="span23" style="border-bottom:1px dotted #DDD;margin-bottom:5px;padding-bottom:5px;">
				  <h2>奖品：{$gname.name}<a href="/?m=kxdr&c=Edit&a=step3&eid={$key}" class="button button-mini button-danger hide " >添加/删除奖品</a></h2>
				  <h4 style="line-height:28px">奖品类型：实物</h4>
				  <p><img src="{$gname.pic_url|cat:'_110x110'}" ></p>
				  <div class="giftbox{$key}{$g_key}" style="position:relative;">
				  {foreach from=$item.gifts item=gift key=gid}
					  {if $gift.gift_id==$g_key}
					    <li class=" breadcrumb span3 gift{$key}{$g_key}" style="position:absolute">
						<p >所属等级：{$gift.level_name}<br />
						数量：{$gift.quantity_initial}份<br />
						剩余：{$gift.quantity}份<br />
						概率：{$gift.probability}%</p>
						{if $gift.advance}
						<p>
						<span class="label label-important">
						{if $gift.advance=="ev-lotts"}<i class="icon-user icon-white"></i>{/if}
						{if $gift.advance=="ev-minute"}<i class="icon-repeat icon-white"></i>{/if}
						{if $gift.advance=="time-range"}<i class="icon-calendar icon-white"></i>{/if}
						{$gift.advance_name}</span>
						</p>
							{if $gift.advance=="time-range"}
								<p>{$gift.range_time_start|date_format:"%m月%d日%H时"} 至<br />
								{$gift.range_time_end|date_format:"%m月%d日%H时"}<br />
								中出：{$gift.advance_quantity}件<br />
								概率：{$gift.advance_probability|default:0}%<br />
								其他时间按主概率中出</p>
							{/if}
							{if $gift.advance=="ev-minute"}
								<p>每隔{$gift.every_minute|default:0}分钟<br />
								中出：{$gift.advance_quantity|default:0}件<br />
								按概率直至中完。</p>
							{/if}
							{if $gift.advance=="ev-lotts"}
								<p>每{$gift.every_lotts|default:0}次抽奖<br />
								中出：{$gift.advance_quantity|default:0}件<br />
								按概率直至中完。</p>
							{/if}
						{/if}
						{if $gift.ext_rule}
						<p><span class="label label-info">{$gift.ext_rule_name}</span></p>
							{if $gift.ext_rule=="order"}
							<p>输入订单号兑换<br />
							金额：{$gift.payment}元<br />
							付款时间：<br />
							{$gift.pay_time_start|date_format:"%m月%d日"} 至 <br />
							{$gift.pay_time_end|date_format:"%m月%d日"}
							</p>
							{/if}{if $gift.ext_rule=="friend_show"}
							<p style="border:1px solid #EEE;padding:2px">{$gift.show_title}<br />
							{$gift.show_content}</p>
							{/if}
							{if $gift.ext_rule=="addcart"}
							<p>将{$gift.cart_items_count}件商品加入购物车<button data-items="{$gift.cart_items}" class="button button-mini">查看</button></p>
							<p class="auxiliary-text">加购物车只做引导，不判定是否真的加入</p>
							{/if}
							{if $gift.ext_rule=="collect"}
							<p>收藏{$gift.collect_items_count}件商品<button data-items="{$gift.collect_items}" class="button button-mini">查看</button></p>
							<p class="auxiliary-text">收藏只做引导，不判定是否真的收藏</p>
							{/if}
							{if $gift.ext_rule=="metal"}
							<p>使用奖章兑换</p>
							<p>{$gift.medal_quant}个勋章：<br />【<img src="{$gift.medal_pic|cat:'_20x20'}" />{$gift.medal_name}】<br /></p>
							{/if}
							{if $gift.ext_rule=="jifen"}
							<p>使用{$gift.jifen|default:0}积分兑换</p>
							{/if}
							{if $gift.ext_rule=="password"}
							<p>凭密码：{$gift.password|default:0}领奖</p>
							{/if}
							{if $gift.rule_medal_id>0}
							<p>必须持有【{$gift.rule_medal_name|default:0}】奖章</p>
							{/if}
						{/if}
							{if $gift.per_user>0}
							<p>每人最多中出{$gift.per_user|default:0}份</p>
							{else}
							<p>不限制每个人中出的数量</p>
							{/if}
						<!-- <p class="auxiliary-text">
						<span class="x-icon x-icon-small x-icon-success js-edit" data-ac="edit" data-id="{$key}"><i class="icon icon-pencil icon-white"></i></span>
						<span class="x-icon x-icon-small x-icon-error js-edit" data-ac="delete" data-quant="{$gift.quantity}" data-id="{$key}" data-fid="{$gift.gift_id}"><i class="icon icon-trash icon-white"></i></span>
						</p> -->
						</li>
					  {/if}
				  {/foreach}
				  </div>
			  </div>
			  {/foreach}
			  </div>
			</div>
		{/foreach}
    <div>
      <div class="pagination pull-right">
	  {$page}
      </div>
    </div>
</div>
      </div>
    </div>
  </div>
  </div>
</body>
</html>